<?php
	$ismailed=0;
	if (isset($_POST['email']) && $_POST['email']!='')
	   {
		  $name=$_REQUEST['name'];
		  $email = $_REQUEST['email'];
		  $mno = $_REQUEST['subject'];
		  $message = $_REQUEST['message'];
		  $ipaddress = $_SERVER['REMOTE_ADDR'];
		  $headers  = 'From: ' .$email. "\r\n" .
					'MIME-Version: 1.0' . "\r\n" .
					'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
					'X-Mailer: PHP/' . phpversion();
		  $subject="Contactus";
		  
		  $message ="<table border='1' cellpadding='20'>
			<tr><td>Name:</td><td>$name</td></tr>
			<tr><td>Email:</td><td>$email</td></tr>
			<tr><td>Mobile Number:</td><td>$mno</td></tr>
			<tr><td>IP Address:</td><td>$ipaddress</td></tr>
			<tr><td>Message:</td><td>$message</td></tr>
		  </table>";
		
		  $to = 'info@aapthitech.com, samarasay@gmail.com';
		  $ismailed=mail($to,$subject,$message, $headers);
		}
	?>
		<?php include('header.php')?>
		<div class=""> 
			<iframe title="Contact us affordable pricing" class="map_wh" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3805.323462316644!2d78.408738!3d17.492065999999994!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3bcb91bf95d686ad%3A0xd00fc02dc175863e!2sAapthi+Technologies!5e0!3m2!1sen!2sin!4v1409568207853"></iframe>
			<br /><small><a href="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3805.323462316644!2d78.408738!3d17.492065999999994!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3bcb91bf95d686ad%3A0xd00fc02dc175863e!2sAapthi+Technologies!5e0!3m2!1sen!2sin!4v1409568207853" class="heigh_let_c" target="_blank">View Larger Map</a></small>
		</div>
		<div class="contact-us container">
			<div class="row">
				<div class="span9">
					<h4>CONTACT US</h4>
					<p> 
						Please send us an email mentioning what you are seeking in a website. we will contact you as soon as possible with a quote
					</p>
					<?php 
					if( $ismailed!=0){?>
					<script> 
						window.location = 'contact-aapthitechnologies?success=true';
					</script>
					<?php }if($_GET['success']){
						echo "<p class='message_style' id='successMessage'><b>Thank you for contacting us, We will get back to you soon.</b></p> ";
					}
					?>
					<form id="contactFormid" method="POST" onsubmit="return validate();" >
						<label for="name" class="nameLabel">Name <span id="errorfname" class="eroorvalidtion_text"></span></label>
						<input class="" id="name" type="text" name="name" placeholder="Enter your name..." autofocus="autofocus">
						<label for="email" class="emailLabel">Email <span id="erroremail" class="eroorvalidtion_text"></span></label>
						<input id="email" type="text" name="email" placeholder="Enter your email..." >
						<label for="subject">Mobile Number <span id="errorsubject" class="eroorvalidtion_text"></span></label>
						<input id="subject" type="text" name="subject" placeholder="Enter your mobile number...">
						<label for="message" class="messageLabel">Message <span id="errormessage" class="eroorvalidtion_text"></span></label>
						<textarea id="message" name="message" placeholder="Your message..." ></textarea>
						<label for="message" class="messageLabel">Captcha<span id="errorCaptchavalidation"  class="eroorvalidtion_text"></span></label>
						<input type="text" class="captcha_input" name="captcha" id="captcha" placeholder="Enter captcha">
			            <input type="text" class="img_captcha" id="refreshCode" name="refreshCode" readonly="readonly" disabled="disabled"  value="">
						
						<img class="img_refresh" src="assets/img/refresh.png"  onclick="return refresh()" alt="refresh"/><br/>
						<button type="submit" id="submit" name="submit" >Send Message</button>
					</form>
				</div>
				<div class="contact-address span3">
					<h4>Get in touch</h4>
					<p>Plot No -5, Beside Vasireddy Swagruha Foods,
					<br />Vivekananda nagar colony, Kukatapally,
					<br />Hyderabad - 500072, India. </p>
					<p>
					<strong>Enquiry Numbers</strong><br/>
					<i class="fa fa-phone"></i>
					<span class="heigh_let_c">+91-8897742021</span><br>
					<strong>Skype</strong><br/>
					<img src="assets/img/skype.png"/>
					<span class="heigh_let_c">sam.phpdev</span><br>
					<b>For Business Enquiry</b><br/>
					<i class="fa fa-envelope"></i>
					 <a href="mailto:info@aapthitech.com" class="heigh_let_c">info@aapthitech.com</a><br/>
					<b>For Support Enquiry</b><br/>
					<i class="fa fa-envelope"></i>
					 <a href="mailto:info@aapthitech.com" class="heigh_let_c">info@aapthitech.com</a><br/>
					 <b>For Jobs Enquiry</b><br/>
					<i class="fa fa-envelope"></i>
					<a href="mailto:info@aapthitech.com" class="heigh_let_c">hr@aapthitech.com</a> 
					</p>
		<div class="our_most_1">
		<h5 class="our_most_popular_app">OUR MOST POPULAR FREE APP</h5>			
		<div class="infobox most_brg_n">
		<a href="https://play.google.com/store/apps/details?id=com.hangover.mobileantitheft" target="_blank">
		<img src="assets/img/web-icons/mobileanritheft.png" alt="mobile Anti Theft" title="Secure your Android devices from theft.simple SMS can get your lost phone back.'Free Download'"/>
		</a>
		<div class="line">Mobile Anti Theft</div>
		<p class="antitheft_c">MAT - Secure your Android devices from theft.simple SMS can get your lost phone back</p>
		<P>Reaching 50,000 Downloads in just 12 months</P>
		<p><a href="https://play.google.com/store/apps/details?id=com.hangover.mobileantitheft" target="_blank" class="dl_btn antitheft_s">Download Now - It is Free</a></p>
		</div>
		</div>
				</div>
			</div>
		</div>
		<a href="#" class="scrollup">Scroll</a>
	
<script>
$(document).ready(function() {
	refresh();
    });
function validate()
	{
	        //alert();
			var flag=true;
			if($('#name').val()==""){
			$('#errorfname').html('-Name Required');
			$('#name').focus();
			flag=false;
			}else{
			$('#errorfname').html('');
			}
			if($('#email').val()==""){
			$('#erroremail').html('-Email Required');
			$('#email').focus();
			flag=false;
			}else{
			$('#erroremail').html('');
			}
			
			if($('#subject').val()==""){
			$('#errorsubject').html('-Mobilenumber Required');
			$('#subject').focus();
			flag=false;
			}else if(isNaN($('#subject').val())){
			$('#errorsubject').html('-Numbers Only');
			$('#subject').focus();
			flag=false;
			}else{
			$('#errorsubject').html('');
			}
		
			if($('#message').val()==""){
			$('#errormessage').html('-Message  Required');
			$('#message').focus();
			flag=false;
			}else{
			$('#errormessage').html('');
			}
			if($('#captcha').val()==""){
			$('#errorCaptchavalidation').html('-Captcha Required');
			$('#captcha').focus();
			flag=false;
			}else if($('#captcha').val()!=$("#refreshCode").val()){ 
             $("#errorCaptchavalidation").html("Please enter the correct code");
	         flag=false;
			}else{
			   $('#errorCaptchavalidation').html('');
			}
			if(flag==false){
				return false;
            }else{
				return true;
				$( "#contactFormid" ).submit();
						
			}
	}	
function refresh(){
	$.ajax({
		url: "captchacgetcode.php",
		type: "POST",				
		success: function(msg){ 
			$("#refreshCode").val(msg);
		},				
	});   
}
	$('#successMessage').delay(6000).fadeOut('slow');
	
</script>

<?php include('footer.php')?>